package com.ynet.hmds28.movie.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class MovieQuery {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    protected Integer pageNo = 1;

    protected Integer startRow;

    protected Integer pageSize = 10;

    protected String fields;

    public MovieQuery() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    public void setPageNo(Integer pageNo) {
        this.pageNo=pageNo;
        this.startRow = (pageNo-1)*this.pageSize;
    }

    public Integer getPageNo() {
        return pageNo;
    }

    public void setStartRow(Integer startRow) {
        this.startRow=startRow;
    }

    public Integer getStartRow() {
        return startRow;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize=pageSize;
        this.startRow = (pageNo-1)*this.pageSize;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setFields(String fields) {
        this.fields=fields;
    }

    public String getFields() {
        return fields;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andMovieidIsNull() {
            addCriterion("movieId is null");
            return (Criteria) this;
        }

        public Criteria andMovieidIsNotNull() {
            addCriterion("movieId is not null");
            return (Criteria) this;
        }

        public Criteria andMovieidEqualTo(String value) {
            addCriterion("movieId =", value, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidNotEqualTo(String value) {
            addCriterion("movieId <>", value, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidGreaterThan(String value) {
            addCriterion("movieId >", value, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidGreaterThanOrEqualTo(String value) {
            addCriterion("movieId >=", value, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidLessThan(String value) {
            addCriterion("movieId <", value, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidLessThanOrEqualTo(String value) {
            addCriterion("movieId <=", value, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidLike(String value) {
            addCriterion("movieId like", value, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidNotLike(String value) {
            addCriterion("movieId not like", value, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidIn(List<String> values) {
            addCriterion("movieId in", values, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidNotIn(List<String> values) {
            addCriterion("movieId not in", values, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidBetween(String value1, String value2) {
            addCriterion("movieId between", value1, value2, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovieidNotBetween(String value1, String value2) {
            addCriterion("movieId not between", value1, value2, "movieid");
            return (Criteria) this;
        }

        public Criteria andMovienameIsNull() {
            addCriterion("movieName is null");
            return (Criteria) this;
        }

        public Criteria andMovienameIsNotNull() {
            addCriterion("movieName is not null");
            return (Criteria) this;
        }

        public Criteria andMovienameEqualTo(String value) {
            addCriterion("movieName =", value, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameNotEqualTo(String value) {
            addCriterion("movieName <>", value, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameGreaterThan(String value) {
            addCriterion("movieName >", value, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameGreaterThanOrEqualTo(String value) {
            addCriterion("movieName >=", value, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameLessThan(String value) {
            addCriterion("movieName <", value, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameLessThanOrEqualTo(String value) {
            addCriterion("movieName <=", value, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameLike(String value) {
            addCriterion("movieName like", value, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameNotLike(String value) {
            addCriterion("movieName not like", value, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameIn(List<String> values) {
            addCriterion("movieName in", values, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameNotIn(List<String> values) {
            addCriterion("movieName not in", values, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameBetween(String value1, String value2) {
            addCriterion("movieName between", value1, value2, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovienameNotBetween(String value1, String value2) {
            addCriterion("movieName not between", value1, value2, "moviename");
            return (Criteria) this;
        }

        public Criteria andMovieimgIsNull() {
            addCriterion("movieImg is null");
            return (Criteria) this;
        }

        public Criteria andMovieimgIsNotNull() {
            addCriterion("movieImg is not null");
            return (Criteria) this;
        }

        public Criteria andMovieimgEqualTo(String value) {
            addCriterion("movieImg =", value, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgNotEqualTo(String value) {
            addCriterion("movieImg <>", value, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgGreaterThan(String value) {
            addCriterion("movieImg >", value, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgGreaterThanOrEqualTo(String value) {
            addCriterion("movieImg >=", value, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgLessThan(String value) {
            addCriterion("movieImg <", value, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgLessThanOrEqualTo(String value) {
            addCriterion("movieImg <=", value, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgLike(String value) {
            addCriterion("movieImg like", value, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgNotLike(String value) {
            addCriterion("movieImg not like", value, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgIn(List<String> values) {
            addCriterion("movieImg in", values, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgNotIn(List<String> values) {
            addCriterion("movieImg not in", values, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgBetween(String value1, String value2) {
            addCriterion("movieImg between", value1, value2, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMovieimgNotBetween(String value1, String value2) {
            addCriterion("movieImg not between", value1, value2, "movieimg");
            return (Criteria) this;
        }

        public Criteria andMoviedescIsNull() {
            addCriterion("movieDesc is null");
            return (Criteria) this;
        }

        public Criteria andMoviedescIsNotNull() {
            addCriterion("movieDesc is not null");
            return (Criteria) this;
        }

        public Criteria andMoviedescEqualTo(String value) {
            addCriterion("movieDesc =", value, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescNotEqualTo(String value) {
            addCriterion("movieDesc <>", value, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescGreaterThan(String value) {
            addCriterion("movieDesc >", value, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescGreaterThanOrEqualTo(String value) {
            addCriterion("movieDesc >=", value, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescLessThan(String value) {
            addCriterion("movieDesc <", value, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescLessThanOrEqualTo(String value) {
            addCriterion("movieDesc <=", value, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescLike(String value) {
            addCriterion("movieDesc like", value, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescNotLike(String value) {
            addCriterion("movieDesc not like", value, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescIn(List<String> values) {
            addCriterion("movieDesc in", values, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescNotIn(List<String> values) {
            addCriterion("movieDesc not in", values, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescBetween(String value1, String value2) {
            addCriterion("movieDesc between", value1, value2, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andMoviedescNotBetween(String value1, String value2) {
            addCriterion("movieDesc not between", value1, value2, "moviedesc");
            return (Criteria) this;
        }

        public Criteria andCinemaidIsNull() {
            addCriterion("cinemaId is null");
            return (Criteria) this;
        }

        public Criteria andCinemaidIsNotNull() {
            addCriterion("cinemaId is not null");
            return (Criteria) this;
        }

        public Criteria andCinemaidEqualTo(String value) {
            addCriterion("cinemaId =", value, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidNotEqualTo(String value) {
            addCriterion("cinemaId <>", value, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidGreaterThan(String value) {
            addCriterion("cinemaId >", value, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidGreaterThanOrEqualTo(String value) {
            addCriterion("cinemaId >=", value, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidLessThan(String value) {
            addCriterion("cinemaId <", value, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidLessThanOrEqualTo(String value) {
            addCriterion("cinemaId <=", value, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidLike(String value) {
            addCriterion("cinemaId like", value, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidNotLike(String value) {
            addCriterion("cinemaId not like", value, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidIn(List<String> values) {
            addCriterion("cinemaId in", values, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidNotIn(List<String> values) {
            addCriterion("cinemaId not in", values, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidBetween(String value1, String value2) {
            addCriterion("cinemaId between", value1, value2, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andCinemaidNotBetween(String value1, String value2) {
            addCriterion("cinemaId not between", value1, value2, "cinemaid");
            return (Criteria) this;
        }

        public Criteria andLooktimeIsNull() {
            addCriterion("lookTime is null");
            return (Criteria) this;
        }

        public Criteria andLooktimeIsNotNull() {
            addCriterion("lookTime is not null");
            return (Criteria) this;
        }

        public Criteria andLooktimeEqualTo(Date value) {
            addCriterion("lookTime =", value, "looktime");
            return (Criteria) this;
        }

        public Criteria andLooktimeNotEqualTo(Date value) {
            addCriterion("lookTime <>", value, "looktime");
            return (Criteria) this;
        }

        public Criteria andLooktimeGreaterThan(Date value) {
            addCriterion("lookTime >", value, "looktime");
            return (Criteria) this;
        }

        public Criteria andLooktimeGreaterThanOrEqualTo(Date value) {
            addCriterion("lookTime >=", value, "looktime");
            return (Criteria) this;
        }

        public Criteria andLooktimeLessThan(Date value) {
            addCriterion("lookTime <", value, "looktime");
            return (Criteria) this;
        }

        public Criteria andLooktimeLessThanOrEqualTo(Date value) {
            addCriterion("lookTime <=", value, "looktime");
            return (Criteria) this;
        }

        public Criteria andLooktimeIn(List<Date> values) {
            addCriterion("lookTime in", values, "looktime");
            return (Criteria) this;
        }

        public Criteria andLooktimeNotIn(List<Date> values) {
            addCriterion("lookTime not in", values, "looktime");
            return (Criteria) this;
        }

        public Criteria andLooktimeBetween(Date value1, Date value2) {
            addCriterion("lookTime between", value1, value2, "looktime");
            return (Criteria) this;
        }

        public Criteria andLooktimeNotBetween(Date value1, Date value2) {
            addCriterion("lookTime not between", value1, value2, "looktime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}